package com.fqgj.sentry.controller.mc.request;

import com.fqgj.common.utils.StringUtils;
import com.fqgj.sentry.common.exception.BizException;
import com.fqgj.sentry.common.exception.enums.ErrorCodeEnums;
import com.fqgj.sentry.common.request.ParamsObject;

/**
 * Created by ykpbean kangping.ying@yuntu-inc.com
 *
 * @description
 * @create 2017-07-21 下午4:28
 */


public class LoginVo extends ParamsObject {
    private String account;
    private String password;

    @Override
    public void validate() {
        if (StringUtils.isStringEmpty(account)||StringUtils.isStringEmpty(password)){
            throw  new BizException(ErrorCodeEnums.param_valid_error);
        }
    }

    public String getAccount() {
        return account;
    }

    public LoginVo setAccount(String account) {
        this.account = account;
        return this;
    }

    public String getPassword() {
        return password;
    }

    public LoginVo setPassword(String password) {
        this.password = password;
        return this;
    }
}
